package ltd.smallwang;

/**
 * @author smallwang
 * @email justdoalitter@gmail.com
 * @create date 2025-01-01 21:16:59
 * @modify date 2025-01-01 21:16:59
 * @desc [description]
 */
public class Leetcode0048 {
  public void rotate(int[][] matrix) {
    // 0-0 -> 0-2
    // 1-0 -> 0-1
    for (int i = 0; i < matrix.length; i++) {
      for (int j = i; j < matrix[0].length; j++) {
        int temp = matrix[i][j];
        matrix[i][j] = matrix[j][i];
        matrix[j][i] = temp;
      }
    }
  }
}
